/*
 * @Author: silence
 * @Date: 2022-08-02 09:13:34
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-08-10 09:14:17
 * @Description: 底部Sheet
 */
import 'package:flutter/material.dart';

class MyBottomSheet {
  /// 显示底部Sheet
  /// isDismissible 点击屏幕是否消失，默认消失
  static show(
      {required BuildContext context,
      required Widget child,
      bool dismissible = true}) {
    showModalBottomSheet(
        isDismissible: dismissible,
        backgroundColor: Colors.transparent,
        context: context,
        builder: (context) {
          return SafeArea(
              child: Column(
            mainAxisSize: MainAxisSize.min,
            mainAxisAlignment: MainAxisAlignment.center,
            children: [child],
          ));
        });
  }
}
